import scrapy


class Test1Spider(scrapy.Spider):
    name = "test1"
    allowed_domains = ["www.xiaoguotu.to8to.com/"]
    start_urls = ["https://xiaoguotu.to8to.com/"]

    def parse(self, response):
        pic_item_list = response.xpath("//div[@id='item']")
        for item in pic_item_list:
            content_name = item.xpath(".//div/a/text()").extract_first()
            content_url = "https:" + item.xpath(".//span/a/@href").extract_first()
            yield scrapy.Request(
                url=content_url, callback=self.pic_parse, dont_filter=True
            )
            break

    def pic_parse(self, response):
        pass
